<include file="public@header" />
<style>
	table{ border:1px solid #000; width:80%; font-size:1rem; margin-bottom:20px}
	td{border:1px solid #000; padding:0 5px; height:2rem; text-align:center}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Aftersale/move')}">合同签订</a></li>
            <li class="active"><a href="{:U('Aftersale/recover')}">凭证回收</a></li>
            <li><a href="{:U('Aftersale/move')}">业务办理</a></li>
            <li><a href="{:U('Aftersale/out')}">迁出反馈</a></li>
		</ul>
        <table>
        	<tr>
            	<td colspan="8">
                	<strong>客户基本信息</strong>
                </td>
            </tr>
        	<tr>
            	<td>
                	合同编号
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	客户姓名
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	证件类型
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	证件编号
                </td>
            	<td>
                	读取
                </td>
            </tr>
            <tr>
            	<td>
                	联系电话
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	联系地址
                </td>
            	<td colspan="5">
                	读取
                </td>
            </tr>
            <tr>
            	<td>
                	购买日期
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	质保期
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	管理器
                </td>
            	<td>
                	计算剩余时间
                </td>
            	<td>
                	当前状态
                </td>
            	<td>
                	读取状态
                </td>
            </tr>
        </table>
        
        <table>
        	<tr>
            	<td colspan="8">
                	<strong>使用人信息</strong>
                </td>
            </tr>
        	<tr>
            	<td>
                	使用人姓名
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	生卒日期
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	安葬时间
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	类型
                </td>
            	<td>
                	骨灰盒/棺木
                </td>
            </tr>
        	<tr>
            	<td>
                	使用人姓名
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	生卒日期
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	安葬时间
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	类型
                </td>
            	<td>
                	骨灰盒/棺木
                </td>
            </tr>
        </table>
        
        <table>
        	<tr>
            	<td colspan="6">
                	<strong>产品信息</strong>
                </td>
            </tr>
        	<tr>
            	<td>
                	墓位编号
                </td>
            	<td>
                	所属区域
                </td>
            	<td>
                	具体位置
                </td>
            	<td>
                	购买价格
                </td>
            	<td>
                	墓碑规格
                </td>
            	<td>
                	墓穴规制
                </td>
            </tr>
        	<tr>
            	<td>
                	读取
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	读取
                </td>
            	<td>
                	读取成交价
                </td>
            	<td>
                	读取长宽高
                </td>
            	<td>
                	读取单双三穴
                </td>
            </tr>
        </table>
        <form class="form-horizontal js-ajax-form" action="{:U('store/add_post')}" method="post" enctype="multipart/form-data">
            <fieldset>
                <div class="control-group">
                    <label class="control-label">迁墓原因</label>
                    <div class="controls">
                        <input type="text" name="user_login" value="">
                        <span class="form-required">*</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">备注说明</label>
                    <div class="controls">
                        <textarea name="user_login" placeholder="请输入0-200字的备注说明" ></textarea>
                        <span class="form-required">*</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">签订合同</label>
                    <div class="controls">
                        <input type="text" name="user_login" value="合同已上传" disabled>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" style="color:red">温馨提示：</label>
                    <div class="controls" style="color:red; margin-top:4px">
                        需收回客户《墓穴使用证》、《购墓合同》、收费凭证盖迁墓印，与持证人身份证拍照上传
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">上传凭证</label>
                    <div class="controls">
                        <input type="hidden" name="photos_url" id="photos_url" value="{$goods.photos_url}">
                        <img height="36" src="" class="preview isHide" id="photos_url_preview" />
						<a class="btn btn-primary" onClick="upload_one_image('迁墓合同', '#photos_url')">{:L("UPLOAD")}</a>
						<span class="form-required">*墓穴使用证</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"></label>
                    <div class="controls">
                        <input type="hidden" name="photos_url" id="photos_url" value="{$goods.photos_url}">
                        <img height="36" src="" class="preview isHide" id="photos_url_preview" />
						<a class="btn btn-primary" onClick="upload_one_image('迁墓合同', '#photos_url')">{:L("UPLOAD")}</a>
						<span class="form-required">*购墓合同</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"></label>
                    <div class="controls">
                        <input type="hidden" name="photos_url" id="photos_url" value="{$goods.photos_url}">
                        <img height="36" src="" class="preview isHide" id="photos_url_preview" />
						<a class="btn btn-primary" onClick="upload_one_image('迁墓合同', '#photos_url')">{:L("UPLOAD")}</a>
						<span class="form-required">*收据或发票</span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"></label>
                    <div class="controls">
                        <input type="hidden" name="photos_url" id="photos_url" value="{$goods.photos_url}">
                        <img height="36" src="" class="preview isHide" id="photos_url_preview" />
						<a class="btn btn-primary" onClick="upload_one_image('迁墓合同', '#photos_url')">{:L("UPLOAD")}</a>
						<span class="form-required">*持证人身份证</span>
                    </div>
                </div>
			</fieldset>
			<div class="form-actions">
            	<div class="btn btn-primary" id="check-btn">保存</div>
				<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
    
	<script type="text/javascript">
	 // 提交订单
	$("#check-btn").click(function(){
		$.post($("form").attr('action'), $("form").serialize(), function(result){
			if(result.state == 'success'){
				alert("保存成功！");
				$('#js-dialog-close').click();
			} else {
				alert(result.info);
			}
		}, 'json');
	});
	
	// 添加使用人
	$("#add_user").click(function(){
		
		var str = "<div name='now_user'><div class='control-group'>"+
					"<label class='control-label'>死者姓名</label>"+
                    "<div class='controls' style='margin-top:5px'>"+
                    	"<input type='text' name='tracking_number' value=''>"+
						"<div class='btn btn-primary' name='del_user' style=' margin-left: 100px;'>删除安葬人</div>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>性别</label>"+
                    "<div class='controls'>"+
                    	"<select name='cate'>"+
                            "<option value='1'>男</option>"+
                            "<option value='2'>女</option>"+
                        "</select>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>逝世日期</label>"+
                    "<div class='controls'>"+
                    	"<input type='date' value=''>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>落葬日期</label>"+
                    "<div class='controls'>"+
                    	"<input type='datetime-local' value=''>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>落葬仪式</label>"+
                    "<div class='controls'>"+
                    	"<input type='text' value=''>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>接待人</label>"+
                    "<div class='controls'>"+
                    	"<input type='text' value=''>"+
                    "</div>"+
				"</div>"+
				"<div class='control-group'>"+
					"<label class='control-label'>备注</label>"+
                    "<div class='controls'>"+
                    	"<textarea></textarea>"+
                    "</div>"+
				"</div>"+
				"</div></div>";
		$("#new_user").append(str);
	});
	// 删除使用人
	$(document).on("click","[name='del_user']",function(){
		$(this).parents("div[name='now_user']").remove();
	})
    </script>

</body>
</html>